package seven.test_7_9;

import java.util.Scanner;

public class TestMain2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int x = scanner.nextInt();
        int[] arr = new int[n];
        int minLen = n;
        int l = 0;
        int r = n;
        for (int i = 0; i < n; i++) {
            arr[i] = scanner.nextInt();
        }
        int t = 0;
        int i = 0;
        int count = 0;
        while (i <= n) {
            count += arr[i];
            while (count >= x) {
                if(i - t < n) {
                    r = i;
                    l = t;
                }
                count -= arr[t];
                t++;
            }
            i++;
        }
        System.out.println(l + 1 + " " + r + 1);
    }
}
